
package com.cy.model;

import com.cy.BasicModel;

import java.util.ArrayList;
import java.util.List;
import com.cy.ext.plugin.tablebind.TableBind;

import java.util.Date;

/**
* Created with IntelliJ IDEA.
* User: Administrator
* Date: 13-9-9
* Time: 下午12:56
* To change this template use File | Settings | File Templates.
*/
@SuppressWarnings("serial")
@TableBind(tableName="package_info",pkName = "package_id")
public class PackageInfo extends BasicModel<PackageInfo> {
    public static final PackageInfo dao = new PackageInfo();
    public static final String SELECT_ALL = "`package_id`,`pack_tag`,`name`,`num`,color,`create_time`,`status` ";



    public PackageInfo findByTag(String tag){
        return findFirst("select * from " + getTableName()+" where pack_tag = ?" ,tag);
    }

    public PackageInfo setPackageId (Long packageId){
        this.set("package_id",packageId);
        return this;
    }

    public Long getPackageId (){
        return this. get("package_id");
    }

        public PackageInfo setPackTag (String packTag){
        this.set("pack_tag",packTag);
        return this;
    }

    public String getPackTag (){
        return this.getStr("pack_tag");
    }

    public PackageInfo setName (String name){
        this.set("name",name);
        return this;
    }

    public String getName (){
        return this.getStr("name");
    }
    public PackageInfo setColor (String color){
        this.set("color",color);
        return this;
    }

    public String getColor (){
        return this.getStr("color");
    }

    public PackageInfo setNum (Long num){
        this.set("num",num);
        return this;
    }

    public Long getNum (){
        return this. get("num");
    }

        public PackageInfo setCreateTime (Date createTime){
        this.set("create_time",createTime);
        return this;
    }

    public Date getCreateTime (){
        return this.getDate("create_time");
    }

        public PackageInfo setStatus (Integer status){
        this.set("status",status);
        return this;
    }

    public Integer getStatus (){
        return this. get("status");
    }
}
